package com.itheima.health.service;

import com.itheima.health.entity.PageResult;
import com.itheima.health.entity.QueryPageBean;
import com.itheima.health.pojo.Permission;

import java.util.List;

public interface PermissionService {

    /**
     * @Author: JASON
     * @Date: 19:34 2021/1/16
     * @Parms [queryPageBean]
     * @ReturnType: java.util.List<com.itheima.health.pojo.Permission>
     * @Description: 权限分页查询
    */
    PageResult findByPage(QueryPageBean queryPageBean);

    /**
     * @Author: JASON
     * @Date: 20:06 2021/1/16
     * @Parms [id]
     * @ReturnType: com.itheima.health.pojo.Permission
     * @Description: 根据id查找权限
    */
    Permission findById(Integer id);

    /**
     * @Author: JASON
     * @Date: 20:10 2021/1/16
     * @Parms [permission]
     * @ReturnType: void
     * @Description: 修改权限
    */
    void edit(Permission permission);

    /**
     * @Author: JASON
     * @Date: 20:19 2021/1/16
     * @Parms []
     * @ReturnType: java.util.List<com.itheima.health.pojo.Permission>
     * @Description: 查询所有
    */
    List<Permission> findAll();

    /**
     * @Author: JASON
     * @Date: 20:19 2021/1/16
     * @Parms [id]
     * @ReturnType: void
     * @Description: 删除权限
    */
    void delete(Integer id);

    /**
     * @Author: JASON
     * @Date: 20:19 2021/1/16
     * @Parms [permission]
     * @ReturnType: void
     * @Description: 添加权限
    */
    void add(Permission permission);
}
